home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / games / spassion / source.lzh / SOURCE / DISP.C < prev    next >
Text File  |  2000-03-31  |  1KB  |  59 lines

  1. /*#include <stdio.h>*/
  2. /*
  3.  *        スプライトの表示等
  4.  */
  5.  
  6. #include <iocslib.H>
  7. #include <XSP2lib.H>
  8. #include "SPASSION.H"
  9. #include "PLAYER.H"
  10. #include "BG.H"
  11. #include "SUB.H"
  12.  
  13. short    box_num=0,old_box_num=0;
  14. BOX_PTR    *old_box_buf[32]={(BOX_PTR *)0,},*box_buf[32]={(BOX_PTR *)0,};
  15.  
  16. void Disp( void )
  17. {
  18.     void    OutBox( void );
  19.  
  20.     PutBGVal0(16*7, 16*0, stage+1, 2, INFO_MOJI );                /* 面数表示 */
  21.  
  22.     xobj_set_st( &left[0] );
  23.     PutBGVal8(8* 4, 8*1,  player[0].left, 1, 0xA3F );            /* 1 桁で残機表示 */
  24.     PutBGVal8(8*0, 8*2,  player[0].score, 5, 0xA3F );            /* 5 桁で点数表示 */
  25.     xsp_set( 8*5+16 , 8*2+16 , obj_moji+0x7A , 0xA3F );            /* 点数に下駄を履かせる */
  26.  
  27.     if( play_mode == MODE_2P ){
  28.         xobj_set_st( &left[1] );
  29.         PutBGVal8(8*31, 8*1,  player[1].left, 1, 0xA3F );            /* 1 桁で残機表示 */
  30.         PutBGVal8(8*25,8*2,  player[1].score, 5, 0xA3F );            /* 5 桁で点数表示 */
  31.         xsp_set( 8*30+16 , 8*2+16 , obj_moji+0x7A , 0xA3F );        /* 点数に下駄を履かせる */
  32.     }
  33.     xsp_vsync( 1 );
  34.     BGSCRLST( 1,bg_x,bg_y );
  35.     HOME( 2, (gr1_x/DOT_RATE ) & 511, (gr1_y/DOT_RATE ) & 511 );
  36.     HOME( 1, (gr2_x/DOT_RATE ) & 511, (gr2_y/DOT_RATE ) & 511 );
  37.     OutBox();
  38.     xsp_out();
  39. }
  40.  
  41.  
  42. void OutBox( void )
  43. {
  44.     BOX_PTR    **old_box=&old_box_buf[0],**box=&box_buf[0];
  45.     void DrawLine( BOX_PTR *box );
  46.  
  47.     for(;*old_box;old_box++){
  48.         DrawLine( *old_box );
  49.     }
  50.  
  51.     for(;*box;box++){
  52.         DrawLine( *box );
  53.     }
  54.     box_num=0;
  55.     old_box_num=0;
  56.         box_buf[0]=(BOX_PTR *)0;
  57.     old_box_buf[0]=(BOX_PTR *)0;
  58. }
  59.